Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cypress): backup and restore sessions when using user apis #6978

Merged
merged 4 commits into from
Jan 8, 2025

Conversation

pixincreate
Copy link
Member

@pixincreate pixincreate commented Jan 2, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

this pr fixes the issue where cookies are not being set when hitting user apis.

  • we need to set cookies. but cypress does not directly support that
  • cy.setCookie() method does not persist outside of the it() block
  • in order to make it persist, we need to set session using cy.session() method in the beforeEach() hook

closes #6977

this pr, of course, does not fix the hooks (caching) issue.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

NA

How did you test it?

image

every failure here is related to assertion and globalState where connectorId and mcaId not getting updated. This can be picked up a separate PR since the fix done in this PR is P0

Checklist

  • I formatted the code npm run format && npm run lint -- --fix
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@pixincreate pixincreate added A-CI-CD Area: Continuous Integration/Deployment S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Jan 2, 2025
@pixincreate pixincreate added this to the December 2024 Release milestone Jan 2, 2025
@pixincreate pixincreate self-assigned this Jan 2, 2025
@pixincreate pixincreate requested a review from a team as a code owner January 2, 2025 15:58
Copy link

semanticdiff-com bot commented Jan 2, 2025

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jan 8, 2025
Merged via the queue into main with commit 0b54b37 Jan 8, 2025
25 of 27 checks passed
@Gnanasundari24 Gnanasundari24 deleted the fix-cookie-cypress branch January 8, 2025 11:43
@pixincreate pixincreate removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jan 8, 2025
pixincreate added a commit that referenced this pull request Jan 9, 2025
…d-memory-cache

* 'main' of github.com:juspay/hyperswitch:
  chore(version): 2025.01.09.0
  fix(cypress): backup and restore sessions when using user apis (#6978)
  feat(users): handle edge features for users in tenancy (#6990)
  chore(dynamic-fields): [Worldpay] update dynamic fields for payments (#7002)
  chore(version): 2025.01.08.0
  fix: consider status of payment method before filtering wallets in list pm (#7004)
  feat(core): add columns unified error code and error message in refund table (#6933)
  feat(connector): [Fiuu] Consume transaction id for error cases for Fiuu (#6998)
  docs(cypress): update cypress documentation (#6956)
pixincreate added a commit to Ankesh2004/hyperswitch that referenced this pull request Jan 9, 2025
…r-verifyurl-in-redirection-handler

* 'main' of github.com:juspay/hyperswitch: (30 commits)
  test(cypress): add test for In Memory Cache (juspay#6961)
  chore(version): 2025.01.09.1
  fix(dummyconnector): add tenant id in dummyconnector requests (juspay#7008)
  chore(version): 2025.01.09.0
  fix(cypress): backup and restore sessions when using user apis (juspay#6978)
  feat(users): handle edge features for users in tenancy (juspay#6990)
  chore(dynamic-fields): [Worldpay] update dynamic fields for payments (juspay#7002)
  chore(version): 2025.01.08.0
  fix: consider status of payment method before filtering wallets in list pm (juspay#7004)
  feat(core): add columns unified error code and error message in refund table (juspay#6933)
  feat(connector): [Fiuu] Consume transaction id for error cases for Fiuu (juspay#6998)
  docs(cypress): update cypress documentation (juspay#6956)
  chore(version): 2025.01.07.0
  chore(keymanager): add tenant-id to keymanager requests (juspay#6968)
  ci(cypress): Add Session Token Testcases (juspay#6683)
  Ci(Cypress): Add PML test and Dynamic Fields Test for Novalnet (juspay#6544)
  chore(version): 2025.01.06.0
  ci(cypress): fix adyen sofort in cypress (juspay#6984)
  chore: add migrations for Currency type in DB (juspay#6980)
  chore(version): 2025.01.03.0
  ...
pixincreate added a commit that referenced this pull request Jan 9, 2025
…d-memory-cache

* 'main' of github.com:juspay/hyperswitch:
  test(cypress): add test for In Memory Cache (#6961)
  chore(version): 2025.01.09.1
  fix(dummyconnector): add tenant id in dummyconnector requests (#7008)
  chore(version): 2025.01.09.0
  fix(cypress): backup and restore sessions when using user apis (#6978)
  feat(users): handle edge features for users in tenancy (#6990)
  chore(dynamic-fields): [Worldpay] update dynamic fields for payments (#7002)
  chore(version): 2025.01.08.0
  fix: consider status of payment method before filtering wallets in list pm (#7004)
  feat(core): add columns unified error code and error message in refund table (#6933)
  feat(connector): [Fiuu] Consume transaction id for error cases for Fiuu (#6998)
  docs(cypress): update cypress documentation (#6956)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI-CD Area: Continuous Integration/Deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG - Cypress] Cookie not passed in user APIs
3 participants